A technology that electrically operates opening and closing of an opening and closing member of a vehicle, for example, a roof, by driving of a motor is known (see Patent document 1). The control technology of Patent document 1 drives to open and dose the roof by separately driving a front portion and a rear portion of the roof The control technology of Patent document 1 controls a rotary direction of a drive motor and an opening and closing direction of the roof by switching on and off of a relay connected to the drive motor for driving the roof.